/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entity;

import java.sql.Connection;
import java.sql.DriverManager;

/**
 *
 * @author tiz
 */
public class ConnectDB {
    Connection con = null;
    public ConnectDB()
    {
        String driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
        String url = "jdbc:sqlserver://localhost:1433;instanceName=VUONGNQ50194"+
                ";databasename=XML";
        String uname = "sa";
        String pwd = "1qaz2wsx";
        try
        {
            Class.forName(driver);
            con = DriverManager.getConnection(url, uname, pwd);
        }
        catch(Exception e)
        {
            System.out.println(e);
        }
    }

    public Connection getCon()
    {
        return con;
    }

}
